package mmoon.mmoonstory.commands.absorb;

import mmoon.mmoonstory.EasyCommand;
import net.minecraft.command.CommandBase;
import net.minecraft.command.CommandException;
import net.minecraft.command.ICommandSender;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.server.MinecraftServer;

public class CommandAbsorbGet extends CommandBase {

    @Override
    public String getName() {
        return "get";
    }

    @Override
    public String getUsage(ICommandSender sender) {
        return "/absorb get [value]";
    }

    @Override
    public void execute(MinecraftServer server, ICommandSender sender, String[] args) throws CommandException {
        if (sender.getCommandSenderEntity() instanceof EntityPlayer) {
            EntityPlayer player = (EntityPlayer) sender.getCommandSenderEntity();
            EasyCommand.msg(player, "Your absorption amount is " + player.getAbsorptionAmount());
        }
    }

    @Override
    public int getRequiredPermissionLevel() {
        return 0;
    }
}
